package com.snailcatmall.www.serversocket.pojo;

import io.netty.channel.ChannelHandlerContext;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @see ClientInfo
 * 客户端标识信息
 */
public class ClientInfo {
    //客户端组,我认为一个客户端允许存在多个组内进行通讯 数据临时通讯用完及时删除指定socket
    private List<String> group = new ArrayList<>();
    //是否为主数据客户端
    private Integer isDbClient =0;
    private ChannelHandlerContext channelHandlerContext;
    private long timeStamp;

    public long getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(long timeStamp) {
        this.timeStamp = timeStamp;
    }

    public ChannelHandlerContext getChannelHandlerContext() {
        return channelHandlerContext;
    }

    public void setChannelHandlerContext(ChannelHandlerContext channelHandlerContext) {
        this.channelHandlerContext = channelHandlerContext;
    }

    public List<String> getGroup() {
        return group;
    }

    public void setGroup(List<String> group) {
        this.group = group;
    }

    public Integer getIsDbClient() {
        return isDbClient;
    }

    public void setIsDbClient(Integer isDbClient) {
        this.isDbClient = isDbClient;
    }

    public ClientInfo() {
    }

    public ClientInfo(List<String> group, Integer isDbClient) {
        this.group = group;
        this.isDbClient = isDbClient;
    }

    @Override
    public String toString() {
        return "ClientInfo{" +
                "group=" + group +
                ", isDbClient=" + isDbClient +
                ", channelHandlerContext=" + channelHandlerContext +
                ", timeStamp=" + timeStamp +
                '}';
    }
}
